<layout name='layout' />
<title>我的信箱</title>
<script>
	$(function() {

		$( "tr" ).click(function(){
			window.location.href="__URL__/read?mid="+$(this).find("td:eq(0)").text();
			});

		$( "#sendname" ).autocomplete({
			source: "__URL__/checkName",
			minLength: 1,
		});
	
		
	});
</script>

<div id="tabs">
<ul>
	<li><a href="#tabs-1">所有信件</a></li>
	<li><a href="#tabs-2">未读信件</a></li>
	<li><a href="#tabs-3">系统消息</a></li>
</ul>
<div id="tabs-1">

<div class="ui-widget">
<form action="__URL__/readall" method="GET"><label for="sendname">发件人姓名:
</label> <input id="sendname" name="sendname" type="text" /> <input
	type="submit" value="搜索"></form>
</div>
<present name="maillist">
<div>
<table id="myTable" class="tablesorter">
	<thead>
		<tr>
			<th style="display: none">mid</th>
			<th width=20%>时间</th>
			<th>发件人</th>
			<th>主题</th>
			<th>状态</th>
			<!--        <th>内容</th>-->
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="maillist" id="vo">
		<tr>
			<td style="display: none">{$vo['mid']}</td>
			<td>{$vo['senddate']|date='Y-m-d H:i',###}</td>
			<td>{$vo['sendname']}</td>
			<td>{$vo['title']}</td>
			<td><eq name="vo['state']" value="0">未读 <else /> 已读 </eq></td>
			<!--        <td>{$vo['content']}</td>-->
			<td><a
				href="__URL__/sendformajax?getname={$vo['sendname']}&title={$vo['title']}">回复消息</a>
			</li>
		</tr>
		</volist>
	</tbody>
</table>
</div>
<div>{$page1}</div>
<else />
<h2>没有邮件</h2>
</present>
</div>


<div id="tabs-2">
<div>
<present name="unreadmaillist">
<div>
<table class="tablesorter">
	<thead>
		<tr>
			<th style="display: none">mid</th>
			<th width=20%>时间</th>
			<th>发件人</th>
			<th>主题</th>
			<th>状态</th>
			<!--        <th>内容</th>-->
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="unreadmaillist" id="vo">
		<tr>
			<td style="display: none">{$vo['mid']}</td>
			<td>{$vo['senddate']|date='Y-m-d H:i',###}</td>
			<td>{$vo['sendname']}</td>
			<td>{$vo['title']}</td>
			<td><eq name="vo['state']" value="0">未读 <else /> 已读 </eq></td>
			<!--        <td>{$vo['content']}</td>-->
			<td><a
				href="__URL__/sendformajax?getname={$vo['sendname']}&title={$vo['title']}">回复消息</a>
			</li>
		</tr>
		</volist>
	</tbody>
</table>
</div>
<div>{$page2}</div>
<else />
<h2>没有邮件</h2>
</present>
</div>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti.
Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu
congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent
eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium
nec, feugiat nec, luctus a, lacus.</p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at,
semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra
justo vitae neque. Praesent blandit adipiscing velit. Suspendisse
potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus
eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non
libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat
porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu
tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce
in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
</div>
</div>



